// Main.java
//
// Informatics 102 Spring 2012
// Code Example
//
// This class demonstrates three kinds of calls to the foo() method in
// the ClassWithRecursiveMethod class:
//
// * The first exhibits no recursion at all, since its parameter is 0.
//
// * The second exhibits only direct recursion (foo() calling foo()),
//   since its parameter is positive.
//
// * The third will exhibits indirect recursion (foo() calling bar()
//   which then calls foo()), since its parameter is negative.

public class Main
{
	public static void main(String[] args)
	{
		System.out.println("First Test: No recursion at all");
		new ClassWithRecursiveMethod().foo(0);
		
		System.out.println();
		System.out.println("Second Test: Direct recursion only");
		new ClassWithRecursiveMethod().foo(3);
		
		System.out.println();
		System.out.println("Third Test: Indirect recursion");
		new ClassWithRecursiveMethod().foo(-3);
	}
}
